import {request} from '../../common/request.js';

export function getProductBycategory(id, data){
	return request("/p/product/category/"+id,data, 'GET');
}

export function getProductById(id){
	return request("/p/product/get/"+id, null, 'GET');
}

export function getProductByCode(id){
	return request("/p/product/code/"+id, null, 'GET');
}


export function getPage(data){
	return request("/p/product/page", data, 'GET');
}


export function getProductReview(data) {
	return request("/p/productreview/comment", data, 'GET');
}

export function getProductFavorites(data) {
	return request("/p/product/favorites", data, 'GET');
}

export function getProductKeys(params) {
	return request("/p/productkeyword/page", params, 'GET');
}

export function getProductKeyHistorys(params) {
	return request("/p/productkeywordhistory/page", params, 'GET');
}

export function delProductHistory(id) {
	return request("/p/productkeywordhistory/remove"+id, null, 'DELETE');
}